package com.hjy.study.studyspringcloudpublic.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;

@RestController
public class publicController {

    @RequestMapping(value = "public",method = RequestMethod.GET)
    public ModelAndView publicStr(){
        System.out.println("======================");
        //重定向
        return new ModelAndView(new RedirectView("http://www.baidu.com"));
    }
}
